//
//  PreDetailTableViewController.m
//  11210
//
//  Created by student on 16/3/7.
//  Copyright © 2016年 niit. All rights reserved.
//

#import "PreDetailTableViewController.h"


@interface PreDetailTableViewController ()
@property (strong, nonatomic) IBOutlet UITextField *nameTextFiled;
@property (strong, nonatomic) IBOutlet UITextField *fromTextFiled;
@property (strong, nonatomic) IBOutlet UITextField *toTextFiled;
@property (strong, nonatomic) IBOutlet UITextField *partyTextFiled;


@end

@implementation PreDetailTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.nameTextFiled.text=self.pre.name;
    self.fromTextFiled.text=self.pre.fromYear;
    self.toTextFiled.text=self.pre.toYear;
    self.partyTextFiled.text=self.pre.party;

}
- (IBAction)savePressed:(id)sender {
    self.pre.name=self.nameTextFiled.text;
    self.pre.fromYear=self.fromTextFiled.text;
    self.pre.toYear=self.toTextFiled.text;
    self.pre.party=self.partyTextFiled.text;
    [self.navigationController popViewControllerAnimated:YES];
    [self.delegate refresh];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}


@end
